<%--
  Created by IntelliJ IDEA.
  User: huashuowei
  Date: 2019/4/20
  Time: 15:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="User.UserDTO" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- Custom Theme files -->
    <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/font-awesome.css" rel="stylesheet"> <!-- Font-Awesome-Icons-CSS -->
</head>
<body>
<%
    UserDTO localUser=(UserDTO)session.getAttribute("LocalUser");

    if(localUser==null){
%>
<div class="main">

    <div class="main-w3lsrow">
        <!-- login form -->
        <div class="login-form login-form-left">
            <div class="agile-row">
                <h2>Login Here</h2>
                <div class="login-agileits-top">
                    <form action="#" method="post">
                        <p>User Name </p>
                        <input type="text" class="name" name="user name" required=""/>
                        <p>Password</p>
                        <input type="password" class="password" name="Password" required=""/>
                        <label class="anim">
                            <input type="checkbox" class="checkbox">
                            <span> Remember me ?</span>
                        </label>
                        <input type="submit" value="Login">
                    </form>
                </div>
                <div class="login-agileits-bottom">
                    <h6><a href="#">Forgot password?</a></h6>
                    <br/>
                    <h6><a href="#">or</a></h6>
                    <br/>
                    <h6><a href="register.jsp">Register Now!</a></h6>
                </div>
                <div class="login-agileits-bottom1">
                    <h3>Other Login Methods</h3>

                </div>
                <div class="social_icons agileinfo">
                    <ul class="top-links">
                        <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                        <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                        <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                        <li><a href="#"><i class="fa fa-google-plus"></i></a></li>
                        <li><a href="https://cas.dgut.edu.cn?appid=javaee&state=STATE"><i class="fa fa-guangong"></i></a></li>
                    </ul>
                </div>

            </div>
        </div>
    </div>
</div>
<%
}else{
%>
<p>学号:<%=localUser.getusername()%></p>
<p>姓名:<%=localUser.getname()%></p>
<p>分组:<%=localUser.getgroup()%></p>
<p>Openid:<%=localUser.getopenid()%></p>
<p>Wx_openid:<%=localUser.getWx_openid()%></p>
<a href="/logout">退出</a>
<%
    }

%>

</body>
</html>


